package ua.maxicash.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ua.maxicash.dao.EmployerDao;
import ua.maxicash.vo.Employer;

import java.util.List;

@Service("employerService")
public class EmployerServiceImpl implements EmployerService{

    @Autowired
    EmployerDao employerDao;

    @Override
    public boolean emailIsFree(String email) {
            return employerDao.emailIsFree(email);
    }

    @Override
    public void addEmployer(Employer employer) {
        employerDao.addEmployer(employer);
    }
    
    @Override
    public void updateEmployer(Employer employer) {
        employerDao.updateEmployer(employer);
    }

    @Override
    public List listEmployer() {
        return employerDao.listEmployer();

    }

    @Override
    public Employer getEmployerByEmail(String email) {
        return employerDao.getEmployerByEmail(email);
    }

    @Override
    public Employer getEmployerById(Long idEmployer) {
        return employerDao.getEmployerById(idEmployer);
    }
}
